home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / LANG / C / GCC / CLIB / !clib / h / locale < prev    next >
Text File  |  1997-03-22  |  3KB  |  93 lines

  1. /* locale.h
  2.  
  3.    For use with the GNU compilers and the SharedCLibrary.
  4.    (c) Copyright 1997, Nick Burrett.  */
  5.  
  6. #ifndef __LOCALE_H
  7. #define __LOCALE_H
  8.  
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12.  
  13. /* Locale information types.  */
  14.  
  15. /* String collation (functions 'strcoll' and 'strxfrm').  */
  16. #define LC_COLLATE 1
  17. /* Classification and conversion of characters, multibyte and
  18.    wide characters.  */
  19. #define LC_CTYPE 2
  20. /* Formatting of monetary values.  */
  21. #define LC_MONETARY 4
  22. /* Formatting of numeric values that are not monetary. */
  23. #define LC_NUMERIC 8
  24. /* Formatting of data and time values.  */
  25. #define LC_TIME 16
  26. /* Entire locale.  */
  27. #define LC_ALL 31
  28.  
  29. /* Sets the current locale for category 'category' to 'locale'.
  30.  
  31.    If 'category' is 'LC_ALL', this specifies the locale for
  32.    all purposes. The other possible values of 'category' specify
  33.    an individual purpose.  */
  34. extern char *setlocale (int category, const char *locale);
  35.  
  36. struct lconv
  37. {
  38.   /* Decimal-point separators used in formatting non-monetary quantities.  */
  39.   char *decimal_point;
  40.   /* Separators used to delimit groups of digits to the left of the
  41.      decimal point in formatting non-monetary quantities.  */
  42.   char *thousands_sep;
  43.   /* A string that specifies how to group the digits to the left
  44.      of the decimal point for non-monetary quantities.  */
  45.   char *grouping;
  46.   /* The international currency symbol for the selected locale.  */
  47.   char *int_curr_symbol;
  48.   /* The local currency symbol for the selected locale.  */
  49.   char *currency_symbol;
  50.   /* Decimal-point separators used in formatting monetary quantities.  */
  51.   char *mon_decimal_point;
  52.   /* Separators used to delimit groups of digits to the left of the
  53.      decimal point in formatting monetary quantities.  */
  54.   char *mon_thousands_sep;
  55.   /* A string that specifies how to group the digits to the left
  56.      of the decimal point for monetary quantities.  */
  57.   char *mon_grouping;
  58.   /* String used to indicate positive (or zero) monetary quantities.  */
  59.   char *positive_sign;
  60.   /* String used to indicate negative monetary quantities.  */
  61.   char *negative_sign;
  62.   /* Small integers indicating how many fractional digits should
  63.      be displayed in a monetary value in international (int_frac_digits)
  64.      and local formats (frac_digits).  */
  65.   char int_frac_digits;
  66.   char frac_digits;
  67.   /* Set to 1 is the 'currency_symbol' string should precede the
  68.      value of a monetary amount, 0 if the string should follow the value.  */
  69.   char p_cs_precedes;
  70.   /* Set to 1 if a space should appear between the 'currency_symbol'
  71.      string and the amount, 0 if no space should appear.  */
  72.   char p_sep_by_space;
  73.   /* Set to 1 is the 'currency_symbol' string should precede the
  74.      value of a monetary amount, 0 if the string should follow the value.  */
  75.   char n_cs_precedes;
  76.   /* Set to 1 if a space should appear between the 'currency_symbol'
  77.      string and the amount, 0 if no space should appear.  */
  78.   char n_sep_by_space;
  79.   /* Indicate how to position the sign for non-negative monetary quantities.  */
  80.   char p_sign_posn;
  81.   /* Indicate how to position the sign for negative monetary quantities.  */
  82.   char n_sign_posn;
  83. };
  84.  
  85. /* Set the lconv structure with the current locale settings.  */
  86. extern struct lconv *localeconv(void);
  87.  
  88. #ifdef __cplusplus
  89. }
  90. #endif
  91.  
  92. #endif
  93.